All Questions
7 questions
4votes
3answers
695views
Parsing csv file to filter rows based on a matching set of characters from a column value
Consider the following csv file: A,3300 B,8440 B,8443 B,8444 C,304 C,404 M,5502 M,5511 The actual csv file is big (around 60,000 rows). I have only included a small version to describe ...
1vote
5answers
259views
How to restructure a date variable in bash
I have a bash script that takes user-inputed dates in this format: dd.mm.yyyy and saves it as a variable $date Now I need to modify this variable to be in this format: yyyymmdd for further use. So ...
0votes
2answers
11kviews
Display grep output in table columns
I need to display grep output in table columns. I have a script that grab info from whois to display the creation, expiry date and ns server of specific domain names. #!/bin/sh cat domain-file.txt |...
49votes
4answers
73kviews
Bash shell script output alignment
My script: date echo -e "${YELLOW}Network check${NC}\n\n" while read hostname do ping -c 1 "$hostname" > /dev/null 2>&1 && echo -e "Network $hostname : ${GREEN}Online${NC}" || ...
1vote
1answer
1kviews
BASH | CSV formatted report
I need to create a report of all files renamed with the ff fields in the CSV formatted report (Output.rpt).I need an output that displays a. Column1 = Original Filename b. Column2 = Original ...
7votes
4answers
14kviews
Print two files in two columns side-by-side
I want to output two text files in two columns — one on the left side and other one on the right. paste doesn't solve the problem, because it only insert a character as delimiter, so if the first file ...
1vote
3answers
222views
Format a help section to have the decription of the flag in one column
I have create a help section that have the following display -m This is a very very very very very very very very very very very very very very very very very very very very long sentence I ...